#ifndef TM_VIDEO_CAPTURE_COLOUR_TRACKER
#define TM_VIDEO_CAPTURE_COLOUR_TRACKER 1
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <stdbool.h>
#include <iostream>
#include "Menu.h"
#include "System.h"

using namespace std;

/* ZMIENNE */
int brightness = 50;
int kneeThreshold = 50;
int nrZnacznika = 0;
CvCapture *captureDevice = NULL;
CvScalar markerColour;
IplImage *lastFrame = NULL;
System system();

static CvScalar colors[] = { { { 0, 0, 255 } }, { { 0, 128, 255 } }, { { 0,
		255, 255 } }, { { 0, 255, 0 } }, { { 255, 128, 0 } },
		{ { 255, 255, 0 } }, { { 255, 0, 0 } }, { { 255, 0, 255 } } };

/* FUNKCJE */
void onBrightnessCalibrated(int position);
void onThresholdCalibrated(int position);
void onZnacznik(int position);
bool initVideoCapture(float brightness, int width, int height);
void initDisplayWindow(bool calibrate);
int getWidth();
int getHeight();
void processFrames();
void showFrame(IplImage *frame);
void releaseDisplayWindow();
void releaseVideoCapture();

#endif
